extends Node2D


# Called when the node enters the scene tree for the first time.
var gamerole:CharacterBody2D
var world:Node2D
var msg:Node
var backGround:Node2D
var left:int = 500
func _ready() -> void:
	world = $"游戏世界"
	msg=$"信息界面"
	backGround = $"游戏世界/3d滚动地面1"
	gamerole = load("res://Code/Player/游戏角色.tscn").instantiate()
	gamerole.LoadRole("鬼人正邪")
	world.add_child(gamerole)
	gamerole.position.x= 900
	gamerole.position.y = 1080
	var djlb:Array
	djlb.append($"信息界面/右界面/装备道具")
	gamerole.角色道具列表.append($"信息界面/右界面/装备道具")
	#播放BGM
	var bgm = "res://Files/Music/mapBGM/"
	SoundManger.play_bgm(load(bgm+GameData.bgmlist[GameData.GameStage-1]))
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	pass
func endGame():
	#退出游戏
	#get_parent().add_child(main)
	queue_free()
	
